package com.atguigu.dga.governance.assessor.spec;

import com.atguigu.dga.constant.DgaConstant;
import com.atguigu.dga.governance.assessor.Assessor;
import com.atguigu.dga.governance.bean.AssessParam;
import com.atguigu.dga.governance.bean.GovernanceAssessDetail;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * ClassName: TecOwnerAssessor
 * Package: com.atguigu.dga.governance.assessor
 * Description:
 *
 * @Author:
 * @Create: 2024/3/16 14:43
 * @Version: 1.0
 */
@Component("TEC_OWNER")
public class TecOwnerAssessor extends Assessor {
    @Override
    public void checkProblem(AssessParam assessParam, GovernanceAssessDetail governanceAssessDetail) {
        String tecOwnerUserName = assessParam.getTableMetaInfo().getTableMetaInfoExtra().getTecOwnerUserName();
        if(tecOwnerUserName == null || DgaConstant.TEC_OWNER_UNSET.equals(tecOwnerUserName)){
            //给分
            governanceAssessDetail.setAssessScore(BigDecimal.ZERO);
            //问题项
            governanceAssessDetail.setAssessProblem("未设定技术负责人");
        }
    }
    //    @Override
//    public void doAssess() {
//        System.out.println("tec");
//    }
}
